﻿<%@ Page Language="C#" MasterPageFile="~/Global/Other.Master" AutoEventWireup="true"
    CodeBehind="OrderList.aspx.cs" Inherits="TVC_WEB.Global.OrderList" Title="Untitled Page" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h1>
        Your Account</h1>
    <p>
    </p>
    <table class="basket">
        <tbody>
            <tr class="alt">
                <td width="50%" align="center">
                    <a href="User.aspx">Personal Information</a>
                </td>
                <td width="50%" align="center">
                    Order Information
                </td>
            </tr>
            <tr class="alt">
                <td style="padding: 0px" colspan="2">
                    <center>
                        <div class="hrd">
                            <hr>
                        </div>
                    </center>
                </td>
            </tr>
        </tbody>
    </table>
    <p>
        &nbsp;</p>
    <h2>
        Order Information</h2>
    <div style="width:770px">
        <telerik:RadGrid  ID="radgridOrder" runat="server" AllowFilteringByColumn="True"
            AllowPaging="True" AllowSorting="True" GridLines="None" Skin="Office2007" AutoGenerateColumns="False"
            OnNeedDataSource="radgridOrder_NeedDataSource" OnPreRender="radgridOrder_PreRender"
            OnDetailTableDataBind="radgridOrder_DetailTableDataBind">
            <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
            </HeaderContextMenu>
            <MasterTableView ShowFooter="True" DataKeyNames="OrderProducts">
                <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                    <HeaderStyle Width="20px"></HeaderStyle>
                </RowIndicatorColumn>
                <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                    <HeaderStyle Width="20px"></HeaderStyle>
                </ExpandCollapseColumn>
                <DetailTables>
                    <telerik:GridTableView DataKeyNames="ID" Name="Orders" Width="100%" ShowFooter="True">
                        <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
                        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                        </ExpandCollapseColumn>
                        <Columns>
                            <telerik:GridHyperLinkColumn DataTextFormatString="Xem" DataNavigateUrlFields="ProductID"
                                UniqueName="ProductID" DataNavigateUrlFormatString="prodetail.aspx?id={0}" HeaderText="Sản phẩm"
                                DataTextField="ProductID">
                            </telerik:GridHyperLinkColumn>
                            <telerik:GridBoundColumn DataField="Quantity" FilterControlAltText="Filter column5 column"
                                HeaderText="Số lượng" UniqueName="column5">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Price" FilterControlAltText="Filter column6 column"
                                HeaderText="Giá" UniqueName="column6" DataFormatString="{0:###,### VNĐ}">
                            </telerik:GridBoundColumn>
                            <telerik:GridCalculatedColumn Aggregate="Sum" DataFields="Price,Quantity" DataFormatString="{0:###,### VNĐ}"
                                DataType="System.Double" Expression="{0}*{1}" FilterControlAltText="Filter column column"
                                HeaderText="Tổng" UniqueName="column">
                            </telerik:GridCalculatedColumn>
                        </Columns>
                        <EditFormSettings>
                            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                            </EditColumn>
                        </EditFormSettings>
                    </telerik:GridTableView>
                </DetailTables>
                <Columns>
                    <telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="Tình trạng"
                        UniqueName="IDStatus">
                        <ItemTemplate>
                            <%#DataBinder.Eval(Container.DataItem, "NameVN")%>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn SortExpression="Ship_Name" HeaderText="Ship Name" HeaderButtonType="TextButton"
                        DataField="Ship_Name">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Ship_Address" HeaderText="Ship Address"
                        HeaderButtonType="TextButton" DataField="Ship_Address" UniqueName="Ship_Address">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Ship_Phone" HeaderText="Ship Phone" HeaderButtonType="TextButton"
                        DataField="Ship_Phone" UniqueName="Ship_Phone">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Ship_City" FilterControlAltText="Filter column2 column"
                        HeaderText="Thành phố" UniqueName="column2">
                    </telerik:GridBoundColumn>
                    <telerik:GridDateTimeColumn DataField="DateTime" DataFormatString="{0:dd/MM/yyyy}"
                        DataType="System.DateTime" FilterControlAltText="Filter column1 column" HeaderText="Ngày order"
                        UniqueName="column1" FilterControlWidth="100px">
                    </telerik:GridDateTimeColumn>
                    <telerik:GridBoundColumn DataField="Notes" FilterControlAltText="Filter column column"
                        HeaderText="Ghi chú" UniqueName="column">
                    </telerik:GridBoundColumn>
                </Columns>
                <EditFormSettings>
                    <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                    </EditColumn>
                </EditFormSettings>
            </MasterTableView>
            <ClientSettings>
                <Scrolling AllowScroll="True" />
            </ClientSettings>
            <FilterMenu EnableImageSprites="False">
            </FilterMenu>
        </telerik:RadGrid>
    </div>
</asp:Content>
